<ion-header>
  <ion-toolbar>
    <ion-title>购物车</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>
  <ion-card>
    <ion-item *ngFor="let item of data; let i = index">
      <ion-label>
        <h3>{{item.title}}</h3>
        <p>{{item.spec}}</p>
      </ion-label>
      <ion-label color="danger">¥{{item.price}}</ion-label>
      <ion-label>
        <ion-button
          [disabled]="item.count=='1'"
          (click)="updateCount(i,-1)"
          fill="outline"
          >-</ion-button
        >
        <ion-text>{{item.count}}</ion-text>
        <ion-button (click)="updateCount(i,1)">+</ion-button>
      </ion-label>
      <ion-button (click)="doDel(i)" color="danger">删除</ion-button>
    </ion-item>
  </ion-card>

  <div style="text-align: right; padding-right: 20px">
    <ion-button color="success">去结算</ion-button>
  </div>
</ion-content>
